<template>
  <div class="search_result_container">
    <van-list
      v-model="loading"
      :finished="finished"
      finished-text="没有更多了"
      @load="onLoad"
      :loading="loading"
    >
      <van-cell
        v-for="(item, index) in resultVlaueLists"
        :key="index"
        :value="item.title"
      />
    </van-list>
  </div>
</template>

<script>
export default {
  name: 'SearchResult',
  props: ['resultVlaueLists', 'queryInfo', 'finished', 'loaded'],
  data () {
    return {
      loading: this.loaded
    }
  },
  methods: {
    onLoad () {
      let page = this.queryInfo.page
      this.$emit('onLoad', ++page)
      this.loading = false
      console.log(this.finished)
    }
  }
}
</script>

<style lang="less" scoped>
.search_result_container {
  /deep/.van-cell {
    padding-top: 30px;
    font-size: 30px;
  }
}
</style>
